Repository navigation
TPT-4596: NAT Service for VPC - #762
Open
ezilber-akamai wants to merge 8 commits into
Open
ezilber-akamai wants to merge 8 commits into
ezilber-akamai wants to merge 8 commits into
Conversation
* Added support for NAT Gateway * Fix lint * Address CoPilot suggestions * Added doc links * Address CoPilot fixes * Address more CoPilot suggestions
* Add int tests for networking NAT Gateway endpoints * Add int tests for VPC subnet with NAT Gateway * Remove condition for NAT gateway deletion * Refactor NAT Gateway integration tests * Clean up * Add fixture for Reserved IP created in the NAT Gateway region * Add test for NAT Gateway and Reserved IP in diff regions
ezilber-akamai
requested review from
mawilk90 and
n0vabyte
and removed request for
a team
November 24, 2026 15:13
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The integration test leaves a directly created reserved IP undeleted after the expected assignment failure, leaking billable resources and consuming account quota on every successful run.
1 open issue
What changed in this PR
Adds NAT Gateway support to the Linode Python SDK, extending networking operations and VPC subnet and interface models.
Changes:
- Adds gateway management, address assignments, interface listing, pricing types, and account settings.
- Supports subnet gateway attachment and detachment while preserving explicit null values.
- Adds unit fixtures, serialization checks, and live integration coverage.
| File | Description |
|---|---|
test/unit/objects/vpc_test.py |
Tests subnet gateway attachment, detachment, and serialization. |
test/unit/objects/networking_test.py |
Tests gateway models and resource operations. |
test/unit/objects/linode_interface_test.py |
Checks interface gateway metadata. |
test/unit/groups/vpc_test.py |
Tests gateway options during VPC creation. |
test/unit/groups/networking_test.py |
Tests gateway collection, creation, types, and settings. |
test/integration/models/vpc/test_vpc.py |
Tests creating a gateway-linked subnet. |
test/integration/models/networking/test_networking.py |
Adds live gateway and address-assignment tests. |
test/integration/conftest.py |
Adds gateway and same-region VPC fixtures. |
test/fixtures/vpcs_123456_subnets.json |
Adds gateway metadata to subnet listings. |
test/fixtures/vpcs_123456_subnets_790.json |
Adds a subnet without a gateway. |
test/fixtures/vpcs_123456_subnets_789.json |
Adds attached gateway details. |
test/fixtures/networking_natgateways.json |
Adds a gateway collection response. |
test/fixtures/networking_natgateways_types.json |
Adds gateway pricing data. |
test/fixtures/networking_natgateways_settings.json |
Adds gateway limits and settings. |
test/fixtures/networking_natgateways_42_interfaces.json |
Adds gateway interface responses. |
test/fixtures/networking_natgateways_42_addresses.json |
Adds address-assignment listing data. |
test/fixtures/networking_natgateways_42_addresses_203.0.113.42.json |
Adds a single address-assignment response. |
test/fixtures/networking_natgateways_42_addresses_203.0.113.42_interfaces.json |
Adds address-specific interface data. |
test/fixtures/linode_instances_124_upgrade-interfaces.json |
Adds gateway details to interface upgrade data. |
test/fixtures/linode_instances_124_interfaces.json |
Adds gateway details to interface listings. |
test/fixtures/linode_instances_124_interfaces_456.json |
Adds gateway details to a single interface. |
linode_api4/objects/vpc.py |
Adds subnet gateway models and creation options. |
linode_api4/objects/networking.py |
Adds gateway models and resource operations. |
linode_api4/objects/linode_interfaces.py |
Models gateway metadata on VPC interfaces. |
linode_api4/groups/vpc.py |
Preserves explicit gateway null values during creation. |
linode_api4/groups/networking.py |
Exposes gateway creation, listing, types, and settings. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📝 Description
Added support for new NAT Gateway endpoints and related integration tests.
✔️ How to Test
make test-unitmake test-int TEST_ARGS="-k nat_gateway"